﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using CF_DAL_WS.Models;
using CF_DAL_WS.DTO;
using System.IO;
namespace CF_DAL_WS
{
	[ServiceContract]
	public interface ICF_DAL_Service
	{
		/////////////////// FOODTYPE ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "FoodType_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<FoodTypeDTO> FoodType_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "FoodType_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		FoodTypeDTO FoodType_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "FoodType_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool FoodType_Insert(FoodTypeDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "FoodType_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool FoodType_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "FoodType_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool FoodType_Update(FoodTypeDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "FoodType_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<FoodTypeDTO> FoodType_RetrieveByID(string id);

		/////////////////// MENU ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Menu_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<MenuDTO> Menu_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Menu_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		MenuDTO Menu_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Menu_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Menu_Insert(MenuDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Menu_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Menu_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Menu_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Menu_Update(MenuDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Menu_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<MenuDTO> Menu_RetrieveByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Menu_SelectByIDRestaurant?idrestaurant={idrestaurant}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<MenuDTO> Menu_SelectByIDRestaurant(string idrestaurant);

		/////////////////// INFORMATIONWEB ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "InformationWeb_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<InformationWebDTO> InformationWeb_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "InformationWeb_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		InformationWebDTO InformationWeb_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "InformationWeb_Insert",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool InformationWeb_Insert(InformationWebDTO obj);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "InformationWeb_Delete",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool InformationWeb_Delete(string id);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "InformationWeb_Update",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool InformationWeb_Update(InformationWebDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "InformationWeb_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<InformationWebDTO> InformationWeb_RetrieveByID(string id);

		/////////////////// RESTAURANT ///////////////////
		[OperationContract]
        [WebGet(
            UriTemplate = "Restaurant_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<RestaurantDTO> Restaurant_SelectAll();

		[OperationContract]
        [WebGet(
            UriTemplate = "Restaurant_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		RestaurantDTO Restaurant_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Restaurant_Insert",
            BodyStyle = WebMessageBodyStyle.Wrapped,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool Restaurant_Insert(ref RestaurantDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Restaurant_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Restaurant_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Restaurant_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Restaurant_Update(RestaurantDTO obj);

		[OperationContract]
        [WebGet(
            UriTemplate = "Restaurant_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<RestaurantDTO> Restaurant_RetrieveByID(string id);

		[OperationContract]
        [WebGet(
            UriTemplate = "Restaurant_SelectByIDDistrict?iddistrict={iddistrict}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<RestaurantDTO> Restaurant_SelectByIDDistrict(string iddistrict);

		[OperationContract]
        [WebGet(
            UriTemplate = "Restaurant_SelectByIDFoodType?idfoodtype={idfoodtype}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<RestaurantDTO> Restaurant_SelectByIDFoodType(string idfoodtype);

        [OperationContract]
        [WebGet(
            UriTemplate = "Restaurant_SelectByIDDistrictAndIDFoodType?iddistrict={iddistrict}&idfoodtype={idfoodtype}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<RestaurantDTO> Restaurant_SelectByIDDistrictAndIDFoodType(string iddistrict, string idfoodtype);

		/////////////////// CONTACT ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Contact_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<ContactDTO> Contact_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Contact_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		ContactDTO Contact_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Contact_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Contact_Insert(ContactDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Contact_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Contact_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Contact_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Contact_Update(ContactDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Contact_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<ContactDTO> Contact_RetrieveByID(string id);

		/////////////////// REPLY ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Reply_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<ReplyDTO> Reply_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Reply_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		ReplyDTO Reply_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Reply_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Reply_Insert(ReplyDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Reply_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Reply_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Reply_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Reply_Update(ReplyDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Reply_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<ReplyDTO> Reply_RetrieveByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Reply_SelectByIDContact?idcontact={idcontact}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<ReplyDTO> Reply_SelectByIDContact(string idcontact);

		/////////////////// FOOD ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Food_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<FoodDTO> Food_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Food_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		FoodDTO Food_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Food_Insert",
            BodyStyle = WebMessageBodyStyle.Wrapped,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Food_Insert(ref FoodDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Food_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Food_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Food_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Food_Update(FoodDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Food_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<FoodDTO> Food_RetrieveByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Food_SelectByIDMenu?idmenu={idmenu}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<FoodDTO> Food_SelectByIDMenu(string idmenu);

        /////////////////// FOOD DETAIL ///////////////////
        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "FoodDetail_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<FoodDetailDTO> FoodDetail_SelectAll();

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "FoodDetail_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        FoodDetailDTO FoodDetail_SelectByID(string id);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "FoodDetail_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool FoodDetail_Insert(FoodDetailDTO obj);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "FoodDetail_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool FoodDetail_Delete(string id);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "FoodDetail_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool FoodDetail_Update(FoodDetailDTO obj);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "FoodDetail_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<FoodDetailDTO> FoodDetail_RetrieveByID(string id);

		/////////////////// Users ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Users_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<UsersDTO> Users_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Users_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		UsersDTO Users_SelectByID(string id);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Users_SelectByUserName?username={username}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        UsersDTO Users_SelectByUserName(string username);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Users_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        string Users_Insert(string username, string password, string email, string role, string name, string phone, string address);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Users_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Users_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Users_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool Users_Update(UsersDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Users_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<UsersDTO> Users_RetrieveByID(string id);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Users_RetrieveByUserName?username={username}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<UsersDTO> Users_RetrieveByUserName(string username);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Users_ChangePassword",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool Users_ChangePassword(string username, string oldpassword, string newpassword);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Users_ResetPassword",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        string Users_ResetPassword(string username, string email);

		/////////////////// CITY ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "City_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<CityDTO> City_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "City_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		CityDTO City_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "City_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool City_Insert(CityDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "City_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool City_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "City_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool City_Update(CityDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "City_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<CityDTO> City_RetrieveByID(string id);

		/////////////////// ORDERS ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Orders_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrdersDTO> Orders_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Orders_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		OrdersDTO Orders_SelectByID(string id);

        /// <summary>
        /// Insert new order
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>-1: cannot insert new order</returns>
		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "Orders_Insert",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		int Orders_Insert(OrdersDTO obj);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "Orders_Delete",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool Orders_Delete(string id);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "Orders_Update",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool Orders_Update(OrdersDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Orders_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrdersDTO> Orders_RetrieveByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Orders_SelectByIDUsers?idUsers={idUsers}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrdersDTO> Orders_SelectByIDUsers(string idUsers);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Orders_SelectByIDRestaurant?idrestaurant={idrestaurant}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<OrdersDTO> Orders_SelectByIDRestaurant(string idrestaurant);

		/////////////////// DISTRICT ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "District_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<DistrictDTO> District_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "District_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		DistrictDTO District_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "District_Insert",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool District_Insert(DistrictDTO obj);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "District_Delete",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool District_Delete(string id);

		[OperationContract]
        [WebInvoke(
           Method = "POST",
           UriTemplate = "District_Update",
           BodyStyle = WebMessageBodyStyle.WrappedRequest,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json)]
		bool District_Update(DistrictDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "District_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<DistrictDTO> District_RetrieveByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "District_SelectByIDCity?idcity={idcity}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<DistrictDTO> District_SelectByIDCity(string idcity);

		/////////////////// ORDERDETAIL ///////////////////
		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "OrderDetail_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrderDetailDTO> OrderDetail_SelectAll();

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "OrderDetail_SelectByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		OrderDetailDTO OrderDetail_SelectByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "OrderDetail_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool OrderDetail_Insert(OrderDetailDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "OrderDetail_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool OrderDetail_Delete(string id);

		[OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "OrderDetail_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		bool OrderDetail_Update(OrderDetailDTO obj);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "OrderDetail_RetrieveByID?id={id}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrderDetailDTO> OrderDetail_RetrieveByID(string id);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "OrderDetail_SelectByIDOrder?idorder={idorder}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrderDetailDTO> OrderDetail_SelectByIDOrder(string idorder);

		[OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "OrderDetail_SelectByIDFood?idfood={idfood}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
		List<OrderDetailDTO> OrderDetail_SelectByIDFood(string idfood);

        /////////////////// CART ///////////////////
        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Cart_SelectByCartID?cartid={cartid}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<CartDTO> Cart_SelectByCartID(string cartid);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Cart_SelectByIDAndFood?cartid={cartid}&foodid={foodid}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        CartDTO Cart_SelectByIDAndFood(string cartid, string foodid);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Cart_SelectByIDAndRecordID?cartid={cartid}&recordid={recordid}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        CartDTO Cart_SelectByIDAndRecordID(string cartid, string recordid);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Cart_SelectByRecordID?recordid={recordid}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        CartDTO Cart_SelectByRecordID(string recordid);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Cart_Insert",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool Cart_Insert(CartDTO obj);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Cart_Delete",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool Cart_Delete(string cartid, string recordid);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Cart_Empty",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool Cart_Empty(string cartid);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "Cart_Update",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        bool Cart_Update(CartDTO obj);

        /////////////////// ROLE ///////////////////
        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Role_SelectAll",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        List<RoleDTO> Role_SelectAll();

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "Validation_ValidateUser?username={username}&password={password}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        string Validation_ValidateUser(string username, string password);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "testsvc?data={data}",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        string testsvc(string data);

        [OperationContract]
        [WebInvoke(
            Method = "POST",
            UriTemplate = "UploadFile",
            BodyStyle = WebMessageBodyStyle.Wrapped)]
        void UploadFile(string filename, byte[] buffer, string oldname = "");

        [OperationContract]
        byte[] DownloadFile(string filename);

        [OperationContract]
        void DeleteFile(string filename);

        [OperationContract]
        [WebInvoke(
            Method = "GET",
            UriTemplate = "TestService",
            BodyStyle = WebMessageBodyStyle.WrappedRequest,
            ResponseFormat = WebMessageFormat.Json,
            RequestFormat = WebMessageFormat.Json)]
        string TestService();
	}
}
